package com.zygh.policeasset.controller;

import com.zygh.policeasset.component.CommonResult;
import com.zygh.policeasset.pojo.Maintenance;
import com.zygh.policeasset.service.MaintenanceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = {"维修记录管理"})
@RequestMapping({"maintenance"})
@RestController
/* loaded from: police-asset-2.0-0.0.1-SNAPSHOT.jar:BOOT-INF/classes/com/zygh/policeasset/controller/MaintenanceController.class */
public class MaintenanceController {
    @Resource
    MaintenanceService maintenanceService;

    @GetMapping({"selectOne"})
    @ApiOperation("通过repair_id查询")
    public Maintenance selectOne(Integer id) {
        return this.maintenanceService.queryById(id);
    }

    @PostMapping({"insert"})
    @ApiOperation("添加")
    public CommonResult insert(@RequestBody Maintenance maintenance) {
        return this.maintenanceService.insert(maintenance);
    }

    @PutMapping({"update"})
    @ApiOperation("修改")
    public CommonResult update(@RequestBody Maintenance maintenance) {
        return this.maintenanceService.update(maintenance);
    }
}